package com.hdsx.jxcsxm.tjbb.server.impl;





import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.hdsx.jxcsxm.xtgl.bean.Param;

import org.springframework.stereotype.Service;

import com.hdsx.dao.query.base.BaseOperate;
import com.hdsx.jxcsxm.tjbb.bean.Excel_list;
import com.hdsx.jxcsxm.tjbb.bean.Excel_tilte;
import com.hdsx.jxcsxm.tjbb.server.TjbbServer;
import com.hdsx.jxcsxm.xtgl.bean.TreeNode;
import com.hdsx.jxcsxm.xtgl.bean.Xmjbxx;



@Service
public class TjbbServerImpl extends BaseOperate  implements TjbbServer{

	public TjbbServerImpl() {
		super("tjbb", "jdbc");
	}

	@Override
	public List<TreeNode> createBtTree(Excel_list elist) {
		return queryList("createBtTree", elist);
	}

	@Override
	public List<Excel_list> getZdyBbzd(Excel_list elist) {
		return queryList("getZdyBbzd", elist);
	}

	@Override
	public List<Excel_list> getJhzxqkb(Excel_list elist) {
		//删除jhzxqkb数据
		String sql1="delete from jhzxqkb";
		String ny="";
		if("".equals(elist.getBbsj())) {
			ny=new Date().getYear()+"-"+new Date().getMonth();
		}else {
			ny=elist.getBbsj().substring(0, 7);
		}
		update("zxsql", sql1);
		//添加jhzxqkb数据
		String sql2="";
		if("N".equals(elist.getSfxszrc()))
				sql2="insert into jhzxqkb select xd.jhxdwh v_1,decode(substr(gydwdm,1,1),'1',xm.gydw,xm.sgydw) v_2,xm.xmmc v_3,xd.ztz v_8,xd.cgs v_9,xd.rys v_10,xd.ttc v_11,xd.dfzc v_12,dw.ztz v_13,dw.cgs v_14,dw.rys v_15,dw.ttc v_16,dw.dfzc v_17,dw.ztz-(jy.zbjc+jy.zsjc+jy.zdjc) v_18,dw.cgs-jy.zbjc v_19,bf.rys v_20,dw.ttc-(jy.zsjc-(dw.rys-bf.rys)) v_21,dw.dfzc-jy.zdjc v_22,jy.zbjc+jy.zsjc+jy.zdjc v_23,jy.zbjc v_24,dw.rys-bf.rys v_25,jy.zsjc-(dw.rys-bf.rys) v_26,jy.zdjc v_27,xm.sgydw,xm.sgydwdm,xm.xmbm,xm.gydwdm "
				+ "from (select wm_concat(distinct jhxdwh) jhxdwh,xmid,wm_concat(distinct xdnf) xdnf,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_xd where 1 = 1   "+elist.getXmnf()+" "+elist.getJhxdwh()+"  group by xmid) xd "
				+ "left join xmjbxx_bb xm on xd.xmid=xm.xmbm "
				+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_dw where ny='"+ny+"' group by xmbm) dw on xd.xmid=dw.xmbm  "
				+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_bf where ny='"+ny+"' group by xmbm) bf on xd.xmid=bf.xmbm  "
				+ "left join (select * from TJBB_jzandjc where ny='"+ny+"') jy on xd.xmid=jy.xmbm "
				+ "where 1=1 "+elist.getXmlx()+" "+elist.getTsdq()+" "+elist.getJhnf()+" "+elist.getGydwdm()+" "+elist.getXzqhdm()+" and xm.xmmc like '%"+elist.getXmmc()+"%' and xm.xmdj like '%"+elist.getXmdj()+"%'";
		else
			sql2="insert into jhzxqkb select xd.jhxdwh v_1,decode(substr(gydwdm,1,1),'1',xm.gydw,xm.sgydw) v_2,xm.xmmc v_3,xd.ztz v_8,xd.cgs v_9,xd.rys v_10,xd.ttc v_11,xd.dfzc v_12,dw.ztz v_13,dw.cgs v_14,dw.rys v_15,dw.ttc v_16,dw.dfzc v_17,dw.ztz-(jy.zbjc+jy.zsjc+jy.zdjc) v_18,dw.cgs-jy.zbjc v_19,bf.rys v_20,dw.ttc-(jy.zsjc-(dw.rys-bf.rys)) v_21,dw.dfzc-jy.zdjc v_22,jy.zbjc+jy.zsjc+jy.zdjc v_23,jy.zbjc v_24,dw.rys-bf.rys v_25,jy.zsjc-(dw.rys-bf.rys) v_26,jy.zdjc v_27,xm.sgydw,xm.sgydwdm,xm.xmbm,xm.gydwdm "
					+ "from (select wm_concat(distinct jhxdwh) jhxdwh,xmid,wm_concat(distinct xdnf) xdnf,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_xd_zrc where 1=1 "+elist.getXmnf()+" "+elist.getJhxdwh()+" group by xmid) xd "
					+ "left join xmjbxx_bb_zrc xm on xd.xmid=xm.xmbm "
					+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_dw_zrc where ny='"+ny+"' group by xmbm) dw on xd.xmid=dw.xmbm  "
					+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_bf_zrc where ny='"+ny+"' group by xmbm) bf on xd.xmid=bf.xmbm  "
					+ "left join (select * from TJBB_jzandjc_zrc where ny='"+ny+"') jy on xd.xmid=jy.xmbm "
					+ "where 1=1 "+elist.getXmlx()+" "+elist.getTsdq()+" "+elist.getJhnf()+" "+elist.getGydwdm()+" "+elist.getXzqhdm()+" and xm.xmmc like '%"+elist.getXmmc()+"%' and xm.xmdj like '%"+elist.getXmdj()+"%'";
		System.out.println("=======sql2::"+sql2);
		update("zxsql", sql2);
		System.out.println("=======sql2插入完毕");
		//
		if("wh".equals(elist.getPxfs())) {
			List<Excel_list> l1=new ArrayList<Excel_list>();
			List<Excel_list> l2=new ArrayList<Excel_list>();
			List<Excel_list> l3=new ArrayList<Excel_list>();
			List<Excel_list> l4=new ArrayList<Excel_list>();
			List<Excel_list> l5=new ArrayList<Excel_list>();
			l1=queryList("cxjhzxqkbhjwh");
			System.out.println("=======l1.size()::"+l1.size());
			l2=queryList("cxjhzxqkbshjwh");
			System.out.println("=======l2.size()::"+l2.size());
			l3=queryList("cxjhzxqkbxhjwh");
			System.out.println("=======l3.size()::"+l3.size());
			l4=queryList("cxjhzxqkbwhhjwh");
			System.out.println("=======l4.size()::"+l4.size());
			l5=queryList("cxjhzxqkbwh");

			System.out.println("=======l5.size()::"+l5.size());
			
			int f3=0,f4=0,f5=0;
			int no2=0,no3=0,no4=0;
			l1.get(0).setSfhj("是");
			for (Excel_list e2 : l2) {
				e2.setSfhj("是");
				l1.add(e2);
				no2+=Integer.parseInt(e2.getV_2());
				if("1".equals(e2.getGydwdm().substring(0, 1))) {
					for (int i = f3; i < l3.size(); i++) {
						l1.add(l3.get(i));f3++;
						no3+=Integer.parseInt(l3.get(i).getV_2());
						for (int j = f4; j < l4.size(); j++) {
							if(Integer.parseInt(l4.get(j).getV_2())!=1)
							l1.add(l4.get(j));f4++;
							
							no4+=Integer.parseInt(l4.get(j).getV_2());
							l1.addAll(l5.subList(f5, f5+Integer.parseInt(l4.get(j).getV_2())));
							f5+=Integer.parseInt(l4.get(j).getV_2());
							if(no4==no3) {
								break;
							}
							
						}
						if(no3==no2) {
							no4=0;
							no3=0;
							no2=0;
							break;
						}
						
					}
					
				}else {
					for (int j = f4; j < l4.size(); j++) {
						if(Integer.parseInt(l4.get(j).getV_2())!=1)
						l1.add(l4.get(j));f4++;
						no4+=Integer.parseInt(l4.get(j).getV_2());
						l1.addAll(l5.subList(f5, f5+Integer.parseInt(l4.get(j).getV_2())));
						f5+=Integer.parseInt(l4.get(j).getV_2());
						if(no4==no2) {
							no4=0;
							no3=0;
							no2=0;
							break;
						}
					}
					
				}
				
			}
			int k=1;
			for (Excel_list e1 : l1) {
				e1.setV_0(k+"");k++;
			}
			System.out.println("=======l1.size()::"+l1.size());
			return l1;
		}
		else if("xm".equals(elist.getPxfs())) {
			String sql3="delete from jhzxqkb_xm";
			
			String sql4="";
			if("N".equals(elist.getSfxszrc()))
					sql4="insert into jhzxqkb_xm "
					+ "select t1.*,t1.v_8 v_4,t2.wcl v_5,t2.wctz v_6,decode(nvl(v_8,0),0,'0%',to_char(round((nvl(t2.wctz,0)/nvl(v_8,0))*100,2))||'%') v_7 from "
					+ "(select ' ' v_0,min(v_3)||'合计' v_1,count(v_1) v_2,min(v_3) v_3,sum(nvl(v_8,0)) v_8,sum(nvl(v_9,0)) v_9,sum(nvl(v_10,0)) v_10,sum(nvl(v_11,0)) v_11,sum(nvl(v_12,0)) v_12,sum(nvl(v_13,0)) v_13,sum(nvl(v_14,0)) v_14,sum(nvl(v_15,0)) v_15,sum(nvl(v_16,0)) v_16,sum(nvl(v_17,0)) v_17,sum(nvl(v_18,0)) v_18,sum(nvl(v_19,0)) v_19,sum(nvl(v_20,0)) v_20,sum(nvl(v_21,0)) v_21,sum(nvl(v_22,0)) v_22,sum(nvl(v_13,0))-sum(nvl(v_18,0)) v_23,sum(nvl(v_14,0))-sum(nvl(v_19,0)) v_24,sum(nvl(v_15,0))-sum(nvl(v_20,0)) v_25,sum(nvl(v_16,0))-sum(nvl(v_21,0)) v_26,sum(nvl(v_17,0))-sum(nvl(v_22,0)) v_27,decode(sum(nvl(v_8,0)),0,'0%',to_char(round((sum(nvl(v_13,0))/sum(nvl(v_8,0)))*100,2))||'%') v_28,decode(sum(nvl(v_13,0)),0,'0%',to_char(round((sum(nvl(v_18,0))/sum(nvl(v_13,0)))*100,2))||'%') v_29,decode(sum(nvl(v_8,0)),0,'0%',to_char(round((sum(nvl(v_18,0))/sum(nvl(v_8,0)))*100,2))||'%') v_30,xmbm,min(sgydwdm) sgydwdm,min(gydwdm) gydwdm,min(sgydw) sgydw,min(v_2) gydw from jhzxqkb group by xmbm ) t1,"
					+ "(select xmbm,sum(nvl(wcl,0)) wcl,sum(nvl(wctz,0)) wctz from XMWC_BB group by xmbm) t2 where t1.xmbm=t2.xmbm(+)";
			else
				sql4="insert into jhzxqkb_xm "
						+ "select t1.*,t1.v_8 v_4,t2.wcl v_5,t2.wctz v_6,decode(nvl(v_8,0),0,'0%',to_char(round((nvl(t2.wctz,0)/nvl(v_8,0))*100,2))||'%') v_7 from "
						+ "(select ' ' v_0,min(v_3)||'合计' v_1,count(v_1) v_2,min(v_3) v_3,sum(nvl(v_8,0)) v_8,sum(nvl(v_9,0)) v_9,sum(nvl(v_10,0)) v_10,sum(nvl(v_11,0)) v_11,sum(nvl(v_12,0)) v_12,sum(nvl(v_13,0)) v_13,sum(nvl(v_14,0)) v_14,sum(nvl(v_15,0)) v_15,sum(nvl(v_16,0)) v_16,sum(nvl(v_17,0)) v_17,sum(nvl(v_18,0)) v_18,sum(nvl(v_19,0)) v_19,sum(nvl(v_20,0)) v_20,sum(nvl(v_21,0)) v_21,sum(nvl(v_22,0)) v_22,sum(nvl(v_13,0))-sum(nvl(v_18,0)) v_23,sum(nvl(v_14,0))-sum(nvl(v_19,0)) v_24,sum(nvl(v_15,0))-sum(nvl(v_20,0)) v_25,sum(nvl(v_16,0))-sum(nvl(v_21,0)) v_26,sum(nvl(v_17,0))-sum(nvl(v_22,0)) v_27,decode(sum(nvl(v_8,0)),0,'0%',to_char(round((sum(nvl(v_13,0))/sum(nvl(v_8,0)))*100,2))||'%') v_28,decode(sum(nvl(v_13,0)),0,'0%',to_char(round((sum(nvl(v_18,0))/sum(nvl(v_13,0)))*100,2))||'%') v_29,decode(sum(nvl(v_8,0)),0,'0%',to_char(round((sum(nvl(v_18,0))/sum(nvl(v_8,0)))*100,2))||'%') v_30,xmbm,min(sgydwdm) sgydwdm,min(gydwdm) gydwdm,min(sgydw) sgydw,min(v_2) gydw from jhzxqkb group by xmbm ) t1,"
						+ "(select xmbm,sum(nvl(wcl,0)) wcl,sum(nvl(wctz,0)) wctz from XM_XMWC group by xmbm) t2 where t1.xmbm=t2.xmbm(+)";
				
			update("zxsql", sql3);
			update("zxsql", sql4);
			
			List<Excel_list> l1=new ArrayList<Excel_list>();
			List<Excel_list> l2=new ArrayList<Excel_list>();
			List<Excel_list> l3=new ArrayList<Excel_list>();
			List<Excel_list> l4=new ArrayList<Excel_list>();
			List<Excel_list> l5=new ArrayList<Excel_list>();
			l1=queryList("cxjhzxqkbhjxm");
			l2=queryList("cxjhzxqkbshjxm");
			l3=queryList("cxjhzxqkbxhjxm");
			l4=queryList("cxjhzxqkbxmhjxm");
			l5=queryList("cxjhzxqkbxm");
			
			int f3=0,f4=0,f5=0;
			int no2=0,no3=0,no4=0;
			
			for (Excel_list e2 : l2) {
				e2.setSfhj("是");
				l1.add(e2);
				no2+=Integer.parseInt(e2.getV_2());
				if("1".equals(e2.getGydwdm().substring(0, 1))) {
					for (int i = f3; i < l3.size(); i++) {
						l1.add(l3.get(i));f3++;
						no3+=Integer.parseInt(l3.get(i).getV_2());
						for (int j = f4; j < l4.size(); j++) {
							if(Integer.parseInt(l4.get(j).getV_2())!=1) {
								l1.add(l4.get(j));
							}
							else {
								System.out.println(f5);
								l5.get(f5).setV_4(l4.get(j).getV_4());
								l5.get(f5).setV_5(l4.get(j).getV_5());
								l5.get(f5).setV_6(l4.get(j).getV_6());
								l5.get(f5).setV_7(l4.get(j).getV_7());
							}
							f4++;
							no4+=Integer.parseInt(l4.get(j).getV_2());
							l1.addAll(l5.subList(f5, f5+Integer.parseInt(l4.get(j).getV_2())));
							f5+=Integer.parseInt(l4.get(j).getV_2());
							if(no4==no3) {
								break;
							}
							
						}
						if(no3==no2) {
							no4=0;
							no3=0;
							no2=0;
							break;
						}
						
					}
					
				}else {
					for (int j = f4; j < l4.size(); j++) {
						if(Integer.parseInt(l4.get(j).getV_2())!=1)
							if(Integer.parseInt(l4.get(j).getV_2())!=1) {
								l1.add(l4.get(j));
							}
							else {
								l5.get(f5).setV_4(l4.get(j).getV_4());
								l5.get(f5).setV_5(l4.get(j).getV_5());
								l5.get(f5).setV_6(l4.get(j).getV_6());
								l5.get(f5).setV_7(l4.get(j).getV_7());
							}
						f4++;
						no4+=Integer.parseInt(l4.get(j).getV_2());
						l1.addAll(l5.subList(f5, f5+Integer.parseInt(l4.get(j).getV_2())));
						f5+=Integer.parseInt(l4.get(j).getV_2());
						if(no4==no2) {
							no4=0;
							no3=0;
							no2=0;
							break;
						}
					}
					
					
				}
				
				
				
			}
			int k=1;
			for (Excel_list e1 : l1) {
				e1.setV_0(k+"");k++;
			}
			
			return l1;
		}else {
			return null;
		}
		
	}
	
	@Override
	public List<Excel_list> getPtglxmzjxqqkb(Excel_list elist) {
		//删除jhzxqkb数据
		/*String sql1="delete from jhzxqkb";
		String ny="";
		if("".equals(elist.getBbsj())) {
			ny=new Date().getYear()+"-"+new Date().getMonth();
		}else {
			ny=elist.getBbsj().substring(0, 7);
		}
		update("zxsql", sql1);
		//添加jhzxqkb数据
		String sql2="";
		
		sql2="insert into jhzxqkb select xd.jhxdwh v_1,decode(substr(gydwdm,1,1),'1',xm.gydw,xm.sgydw) v_2,xm.xmmc v_3,xd.ztz v_8,xd.cgs v_9,xd.rys v_10,xd.ttc v_11,xd.dfzc v_12,dw.ztz v_13,dw.cgs v_14,dw.rys v_15,dw.ttc v_16,dw.dfzc v_17,dw.ztz-(jy.zbjc+jy.zsjc+jy.zdjc) v_18,dw.cgs-jy.zbjc v_19,bf.rys v_20,dw.ttc-(jy.zsjc-(dw.rys-bf.rys)) v_21,dw.dfzc-jy.zdjc v_22,jy.zbjc+jy.zsjc+jy.zdjc v_23,jy.zbjc v_24,dw.rys-bf.rys v_25,jy.zsjc-(dw.rys-bf.rys) v_26,jy.zdjc v_27,xm.sgydw,xm.sgydwdm,xm.xmbm,xm.gydwdm "
		+ "from (select wm_concat(distinct jhxdwh) jhxdwh,xmid,wm_concat(distinct xdnf) xdnf,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_xd where 1 = 1   "+elist.getXmnf()+" "+elist.getJhxdwh()+"  group by xmid) xd "
		+ "left join xmjbxx_bb xm on xd.xmid=xm.xmbm "
		+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_dw where ny='"+ny+"' group by xmbm) dw on xd.xmid=dw.xmbm  "
		+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_bf where ny='"+ny+"' group by xmbm) bf on xd.xmid=bf.xmbm  "
		+ "left join (select * from TJBB_jzandjc where ny='"+ny+"') jy on xd.xmid=jy.xmbm "
		+ "where 1=1 "+elist.getXmlx()+" "+elist.getTsdq()+" "+elist.getJhnf()+" "+elist.getGydwdm()+" "+elist.getXzqhdm()+" and xm.xmdj like '%"+elist.getXmdj()+"%'";
		
		update("zxsql", sql2);*/
		//
			List<Excel_list> l1=new ArrayList<Excel_list>();
			List<Excel_list> l2=new ArrayList<Excel_list>();
			
			l1=queryList("cxPtglxmzjxqqkbhj",elist);
			l2=queryList("getPtglxmzjxqqkb",elist);
			

			for (Excel_list e2 : l2) {
				l1.add(e2);
			}
			
			return l1;
		
	}

	@Override
	public List<Excel_list> getSbzjjhhzb(Excel_list elist) {
			List<Excel_list> l1=new ArrayList<Excel_list>();
			l1=queryList("getSbzjjhhzb",elist);
			return l1;

	}

	@Override
	public List<Excel_list> getPtglxmssjzjdwqk(Excel_list elist) {
		//删除jhzxqkb数据
		/*String sql1="delete from jhzxqkb";
		String ny="";
		if("".equals(elist.getBbsj())) {
			ny=new Date().getYear()+"-"+new Date().getMonth();
		}else {
			ny=elist.getBbsj().substring(0, 7);
		}
		update("zxsql", sql1);
		//添加jhzxqkb数据
		String sql2="";
		
		sql2="insert into jhzxqkb select xd.jhxdwh v_1,decode(substr(gydwdm,1,1),'1',xm.gydw,xm.sgydw) v_2,xm.xmmc v_3,xd.ztz v_8,xd.cgs v_9,xd.rys v_10,xd.ttc v_11,xd.dfzc v_12,dw.ztz v_13,dw.cgs v_14,dw.rys v_15,dw.ttc v_16,dw.dfzc v_17,dw.ztz-(jy.zbjc+jy.zsjc+jy.zdjc) v_18,dw.cgs-jy.zbjc v_19,bf.rys v_20,dw.ttc-(jy.zsjc-(dw.rys-bf.rys)) v_21,dw.dfzc-jy.zdjc v_22,jy.zbjc+jy.zsjc+jy.zdjc v_23,jy.zbjc v_24,dw.rys-bf.rys v_25,jy.zsjc-(dw.rys-bf.rys) v_26,jy.zdjc v_27,xm.sgydw,xm.sgydwdm,xm.xmbm,xm.gydwdm "
		+ "from (select wm_concat(distinct jhxdwh) jhxdwh,xmid,wm_concat(distinct xdnf) xdnf,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_xd where 1 = 1   "+elist.getXmnf()+" "+elist.getJhxdwh()+"  group by xmid) xd "
		+ "left join xmjbxx_bb xm on xd.xmid=xm.xmbm "
		+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_dw where ny='"+ny+"' group by xmbm) dw on xd.xmid=dw.xmbm  "
		+ "left join (select wm_concat(distinct jhxdwh) jhxdwh,xmbm,sum(ztz) ztz,sum(cgs) cgs,sum(rys) rys,sum(ttc) ttc,sum(dfzc) dfzc from jhzxqkb_bf where ny='"+ny+"' group by xmbm) bf on xd.xmid=bf.xmbm  "
		+ "left join (select * from TJBB_jzandjc where ny='"+ny+"') jy on xd.xmid=jy.xmbm "
		+ "where 1=1 "+elist.getXmlx()+" "+elist.getTsdq()+" "+elist.getJhnf()+" "+elist.getGydwdm()+" "+elist.getXzqhdm()+" and xm.xmdj like '%"+elist.getXmdj()+"%'";
		
		update("zxsql", sql2);*/
		//
			List<Excel_list> l1=new ArrayList<Excel_list>();
			List<Excel_list> l2=new ArrayList<Excel_list>();
			
			l1=queryList("cxgetPtglxmssjzjdwqkhj",elist);
			l2=queryList("getgetPtglxmssjzjdwqk",elist);
			

			for (Excel_list e2 : l2) {
				l1.add(e2);
			}
			
			return l1;
		
	}

	@Override
	public List<Excel_list> qsptglxmsbcgsjczjqkb(Excel_list elist) {

			List<Excel_list> l1=new ArrayList<Excel_list>();
			List<Excel_list> l2=new ArrayList<Excel_list>();

			l1=queryList("qsptglxmsbcgsjczjqkbhj",elist);
			l2=queryList("qsptglxmsbcgsjczjqkb",elist);


			for (Excel_list e2 : l2) {
				l1.add(e2);
			}

			return l1;

	}

	@Override
	public List<Excel_list> qsptglxmsbcgsjczjqkxmtjb(Excel_list elist) {

			List<Excel_list> l1=new ArrayList<Excel_list>();
			List<Excel_list> l2=new ArrayList<Excel_list>();

			l1=queryList("qsptglxmsbcgsjczjqkxmtjbhj",elist);
			l2=queryList("qsptglxmsbcgsjczjqkxmtjb",elist);


			for (Excel_list e2 : l2) {
				l1.add(e2);
			}

			return l1;

	}

	@Override
	public List<Excel_list> qsptglxmsbcgsjczjqkbGhcx(Excel_list elist) {

			List<Excel_list> l1=new ArrayList<Excel_list>();
			l1=queryList("qsptglxmsbcgsjczjqkbGhcx",elist);
			return l1;

	}

	@Override
	public List<Excel_list> qsptglxmsbcgsjczjqkXmtjbGhcx(Excel_list elist) {

			List<Excel_list> l1=new ArrayList<Excel_list>();
			l1=queryList("qsptglxmsbcgsjczjqkbGhXmtjcx",elist);
			return l1;

	}

	@Override
	public List<Excel_list> getTzhzb(Excel_list elist) {
		List<Excel_list> l1=new ArrayList<Excel_list>();
		List<Excel_list> l2=new ArrayList<Excel_list>();
		List<Excel_list> l3=new ArrayList<Excel_list>();
		if("N".equals(elist.getSfxszrc())) {
			l2=queryList("getTzhzbHj", elist);
			l3=queryList("getTzhzb", elist);
		}else {
			l2=queryList("getTzhzbHjzrc", elist);
			l3=queryList("getTzhzbzrc", elist);
		}
		
		for (int i = 0; i < l2.size(); i++) {
			l1.add(l2.get(i));
			int k=1;
			for (int j = 0; j < l3.size(); j++) {
				if(l2.get(i).getXzqhdm().equals(l3.get(j).getXzqhdm())){
					l3.get(j).setV_0(""+k);
					l1.add(l3.get(j));
					k++;
				}
			}
		}
		
		return l1;
	}

	@Override
	public List<Xmjbxx> queryXmlist(Xmjbxx xmjbxx) {
		return queryList("queryXmlist", xmjbxx);
	}

	@Override
	public int queryXmlistCount(Xmjbxx xmjbxx) {
		return queryOne("queryXmlistCount", xmjbxx);
	}

	@Override
	public List<Excel_list> getTzmxbbt(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=queryList("getTzmxbbtdw",elist);
		List<Excel_list> l2=queryList("getTzmxbbtbf",elist);
		String sql0="select '一' v_0,'收款情况（收拨款情况）' v_1,xd.ztz v_2,dw2.ztz v_3,";
		String sql="select '1' v_0,'车购税' v_1,xd.cgs v_2,dw2.cgs v_3,";
		String sql1="select '2' v_0,'燃油税' v_1,xd.rys v_2,dw2.rys v_3,";
		String sql2="select '3' v_0,'厅统筹' v_1,xd.ttc v_2,dw2.ttc v_3,";
		String sql3="select '4' v_0,'地方自筹' v_1,xd.dfzc v_2,dw2.dfzc v_3,";
		String sql4="select ' ' v_0,'拨款情况（拨款明细）' v_1,null v_2,null v_3,";
		String sql5="select '5' v_0,'标段一小计' v_1,null v_2,null v_3,";
		String sql6="select '6' v_0,'标段二小计' v_1,null v_2,null v_3,";
		
		String dwsql0="( select ";String bfsql0="(select ";
		String dwsql="( select ";String bfsql="(select ";
		String dwsql1="( select ";String bfsql1="(select ";
		String dwsql2="( select ";String bfsql2="(select ";
		String dwsql3="( select ";String bfsql3="(select ";
		String dwsql4="( select ";String bfsql4="(select ";
		String dwsql5="( select ";String bfsql5="(select ";
		String dwsql6="( select ";String bfsql6="(select ";
		String dwbt="";String bfbt="";
		int x=4;
		if(l1.size()>0){
			sql0+="dw1.ztz v_4,dws.*,";
			sql+="dw1.cgs v_4,dws.*,";
			sql1+="dw1.rys v_4,dws.*,";
			sql2+="dw1.ttc v_4,dws.*,";
			sql3+="dw1.dfzc v_4,dws.*,";
			sql4+="null v_4,dws.*,";
			sql5+="null v_4,dws.*,";
			sql6+="null v_4,dws.*,";
			//明天从这里开始做，要一个一个拼出来
			x++;
		}
		for (int i = 0; i < l1.size(); i++) {
			dwsql0+="sum(decode(dw.dwyf,'"+l1.get(i).getV_0()+"',dw.ztz)) v_"+x+",";
			dwsql+="sum(decode(dw.dwyf,'"+l1.get(i).getV_0()+"',dw.cgs)) v_"+x+",";
			dwsql1+="sum(decode(dw.dwyf,'"+l1.get(i).getV_0()+"',dw.rys)) v_"+x+",";
			dwsql2+="sum(decode(dw.dwyf,'"+l1.get(i).getV_0()+"',dw.ttc)) v_"+x+",";
			dwsql3+="sum(decode(dw.dwyf,'"+l1.get(i).getV_0()+"',dw.dfzc)) v_"+x+",";
			dwsql4+="null v_"+x+",";
			dwsql5+="null v_"+x+",";
			dwsql6+="null v_"+x+",";
			dwbt+=l1.get(i).getV_0()+",";
			x++;
		}
		sql0+="bf2.ztz v_"+x+",";
		sql+="bf2.cgs v_"+x+",";
		sql1+="bf2.rys v_"+x+",";
		sql2+="bf2.ttc v_"+x+",";
		sql3+="bf2.dfzc v_"+x+",";
		sql4+="bf2.ztz v_"+x+",";
		sql5+="bf2.ztz v_"+x+",";
		sql6+="bf2.ztz v_"+x+",";
		x++;
		if(l2.size()>0){
			sql0+="bf1.ztz v_"+x+",bfs.*,";
			sql+="bf1.cgs v_"+x+",bfs.*,";
			sql1+="bf1.rys v_"+x+",bfs.*,";
			sql2+="bf1.ttc v_"+x+",bfs.*,";
			sql3+="bf1.dfzc v_"+x+",bfs.*,";
			sql4+="bf1.ztz v_"+x+",bfs.*,";
			sql5+="bf1.ztz v_"+x+",bfs.*,";
			sql6+="bf1.ztz v_"+x+",bfs.*,";
			
			x++;
		}
		for (int i = 0; i < l2.size(); i++) {
			bfsql0+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.ztz)) v_"+x+",";
			bfsql+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.cgs)) v_"+x+",";
			bfsql1+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.rys)) v_"+x+",";
			bfsql2+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.ttc)) v_"+x+",";
			bfsql3+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.dfzc)) v_"+x+",";
			bfsql4+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.ztz)) v_"+x+",";
			bfsql5+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.ztz)) v_"+x+",";
			bfsql6+="sum(decode(bf.bfyf,'"+l2.get(i).getV_0()+"',bf.ztz)) v_"+x+",";
			bfbt+=l2.get(i).getV_0()+",";
			x++;
		}
		sql0+="nvl(dw2.ztz,0)+nvl(dw1.ztz,0) v_"+(x+0)+",nvl(bf2.ztz,0)+nvl(bf1.ztz,0) v_"+(x+1)+",xd.ztz-(nvl(dw2.ztz,0)+nvl(dw1.ztz,0)) v_"+(x+2)+",(nvl(dw2.ztz,0)+nvl(dw1.ztz,0))-(nvl(bf2.ztz,0)+nvl(bf1.ztz,0)) v_"+(x+3)+",null v_"+(x+4)+",'0' xh";
		sql+="nvl(dw2.cgs,0)+nvl(dw1.cgs,0) v_"+(x+0)+",nvl(bf2.cgs,0)+nvl(bf1.cgs,0) v_"+(x+1)+",xd.cgs-(nvl(dw2.cgs,0)+nvl(dw1.cgs,0)) v_"+(x+2)+",(nvl(dw2.cgs,0)+nvl(dw1.cgs,0))-(nvl(bf2.cgs,0)+nvl(bf1.cgs,0)) v_"+(x+3)+",null v_"+(x+4)+",'1' xh";
		sql1+="nvl(dw2.rys,0)+nvl(dw1.rys,0) v_"+(x+0)+",nvl(bf2.rys,0)+nvl(bf1.rys,0) v_"+(x+1)+",xd.rys-(nvl(dw2.rys,0)+nvl(dw1.rys,0)) v_"+(x+2)+",(nvl(dw2.rys,0)+nvl(dw1.rys,0))-(nvl(bf2.rys,0)+nvl(bf1.rys,0)) v_"+(x+3)+",null v_"+(x+4)+",'2' xh";
		sql2+="nvl(dw2.ttc,0)+nvl(dw1.ttc,0) v_"+(x+0)+",nvl(bf2.ttc,0)+nvl(bf1.ttc,0) v_"+(x+1)+",xd.ttc-(nvl(dw2.ttc,0)+nvl(dw1.ttc,0)) v_"+(x+2)+",(nvl(dw2.ttc,0)+nvl(dw1.ttc,0))-(nvl(bf2.ttc,0)+nvl(bf1.ttc,0)) v_"+(x+3)+",null v_"+(x+4)+",'3' xh";
		sql3+="nvl(dw2.dfzc,0)+nvl(dw1.dfzc,0) v_"+(x+0)+",nvl(bf2.dfzc,0)+nvl(bf1.dfzc,0) v_"+(x+1)+",xd.dfzc-(nvl(dw2.dfzc,0)+nvl(dw1.dfzc,0)) v_"+(x+2)+",(nvl(dw2.dfzc,0)+nvl(dw1.dfzc,0))-(nvl(bf2.dfzc,0)+nvl(bf1.dfzc,0)) v_"+(x+3)+",null v_"+(x+4)+",'4' xh";
		sql4+="null v_"+(x+0)+",nvl(bf2.ztz,0)+nvl(bf1.ztz,0) v_"+(x+1)+",null v_"+(x+2)+",null v_"+(x+3)+",null v_"+(x+4)+",'5' xh";
		sql5+="null v_"+(x+0)+",nvl(bf2.ztz,0)+nvl(bf1.ztz,0) v_"+(x+1)+",null v_"+(x+2)+",null v_"+(x+3)+",null v_"+(x+4)+",'6' xh";
		sql6+="null v_"+(x+0)+",nvl(bf2.ztz,0)+nvl(bf1.ztz,0) v_"+(x+1)+",null v_"+(x+2)+",null v_"+(x+3)+",null v_"+(x+4)+",'7' xh";
		
		dwsql0+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		dwsql+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		dwsql1+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		dwsql2+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		dwsql3+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		dwsql4+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		dwsql5+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		dwsql6+="xmbm dwjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,dwyf,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+"  group by dwyf,xmbm) dw group by xmbm) dws,";
		
		bfsql0+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+"  group by bfyf,xmbm) bf group by xmbm) bfs," ;
		bfsql+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+"  group by bfyf,xmbm) bf group by xmbm) bfs," ;
		bfsql1+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+"  group by bfyf,xmbm) bf group by xmbm) bfs," ;
		bfsql2+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+"  group by bfyf,xmbm) bf group by xmbm) bfs," ;
		bfsql3+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+"  group by bfyf,xmbm) bf group by xmbm) bfs," ;
		bfsql4+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+"  group by bfyf,xmbm) bf group by xmbm) bfs," ;
		bfsql5+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" and bd='标段一' group by bfyf,xmbm) bf group by xmbm) bfs," ;
		bfsql6+="xmbm bfjhxdwh from (select sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmbm,bfyf,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" and bd='标段二' group by bfyf,xmbm) bf group by xmbm) bfs," ;
		
		String table0=
			      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
						+dwsql0
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
						+bfsql0
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" group by xmbm) bf1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" group by xmbm) bf2" 
						+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
						+" and xd.xmid='"+elist.getXmbm()+"'";
		String table=
	      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
				+dwsql
				+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
				+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
				+bfsql
				+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" group by xmbm) bf1," 
				+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" group by xmbm) bf2" 
				+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
				+" and xd.xmid='"+elist.getXmbm()+"'";
		String table1=
			      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
						+dwsql1
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
						+bfsql1
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" group by xmbm) bf1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" group by xmbm) bf2" 
						+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
						+" and xd.xmid='"+elist.getXmbm()+"'";
		String table2=
			      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
						+dwsql2
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
						+bfsql2
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" group by xmbm) bf1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" group by xmbm) bf2" 
						+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
						+" and xd.xmid='"+elist.getXmbm()+"'";
		String table3=
			      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
						+dwsql3
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
						+bfsql3
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" group by xmbm) bf1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" group by xmbm) bf2" 
						+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
						+" and xd.xmid='"+elist.getXmbm()+"'";
		String table4=
			      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
						+dwsql4
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
						+bfsql4
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" group by xmbm) bf1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" group by xmbm) bf2" 
						+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
						+" and xd.xmid='"+elist.getXmbm()+"'";
		String table5=
			      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
						+dwsql5
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
						+bfsql5
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" and bd='标段一' group by xmbm) bf1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" and bd='标段一' group by xmbm) bf2" 
						+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
						+" and xd.xmid='"+elist.getXmbm()+"'";
		String table6=
			      " from (select sum(nvl(btzzj,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(btzzj,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,sum(nvl(ztz,0)) ztz,xmid,xmid jhxdwh from xm_gsd_jhxd xm where jhxdwh is not null group by xmid) xd," 
						+dwsql6
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)="+elist.getJhnf()+" group by xmbm) dw1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjdw xm where jhxdwh is not null and substr(dwyf,0,4)<"+elist.getJhnf()+" group by xmbm) dw2," 
						+bfsql6
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)="+elist.getJhnf()+" and bd='标段二' group by xmbm) bf1," 
						+" (select sum(nvl(ztz,0)) ztz,sum(nvl(cgs,0)) cgs,sum(nvl(rys,0)) rys,sum(nvl(ztz,0))-sum(nvl(cgs,0))-sum(nvl(rys,0))-sum(nvl(dfzc,0)) ttc,sum(nvl(dfzc,0)) dfzc,xmbm,xmbm jhxdwh from xm_zjbf xm where jhxdwh is not null and substr(bfyf,0,4)<"+elist.getJhnf()+" and bd='标段二' group by xmbm) bf2" 
						+" where xd.jhxdwh=dws.dwjhxdwh(+) and xd.jhxdwh=dw1.jhxdwh(+) and xd.jhxdwh=dw2.jhxdwh(+) and xd.jhxdwh=bfs.bfjhxdwh(+) and xd.jhxdwh=bf1.jhxdwh(+) and xd.jhxdwh=bf2.jhxdwh(+)"
						+" and xd.xmid='"+elist.getXmbm()+"'";
		sql0+=table0+" union all " +sql+table+" union all " +sql1+table1+" union all " +sql2+table2+" union all " +sql3+table3+" union all " +sql4+table4+" union all " +sql5+table5+" union all " +sql6+table6;
		
		
		
		elist.setSql(sql0);
		l=queryList("queryListBySql",elist);
		if(l.size()>0){
			if(dwbt.length()>0)
			l.get(0).setDwbt(dwbt.substring(0,dwbt.length() - 1));
			if(bfbt.length()>0)
			l.get(0).setBfbt(bfbt.substring(0,bfbt.length() - 1));
		}
			
		return l;
	}

	@Override
	public List<Excel_list> getGlzcqkb(Excel_list elist) {
		return queryList("getGlzcqkb",elist);
	}

	@Override
	public boolean importTjbb(List<Map> data) {
		deleteBatch("deleteTjbb", data);
		
		for (Map map : data) {
			System.out.println(map);
		}
		
		return insertBatch("importTjbb", data)==data.size();
	}

	@Override
	public boolean addGhbbHx(List<Excel_list> list) {
//		deleteBatch("deleteTjbb", data);

//		for (Map map : data) {
//			System.out.println(map);
//		}

		return insertBatch("addGhbbHx", list)==list.size();
	}

	@Override
	public boolean addGhXmtjbbHx(List<Excel_list> list) {
//		deleteBatch("deleteTjbb", data);

//		for (Map map : data) {
//			System.out.println(map);
//		}

		return insertBatch("addGhXmtjbbHx", list)==list.size();
	}

	@Override
	public boolean selectGhbbCf(Excel_list list) {
		return queryList("qsptglxmsbcgsjczjqkbGhcx",list).size()>0 ;
	}

	@Override
	public boolean selectGhbbXmtjCf(Excel_list list) {
		return queryList("qsptglxmsbcgsjczjqkbGhXmtjcx",list).size()>0 ;
	}

	@Override
	public boolean deleteGhbbByghny(Excel_list list) {
        if(delete("deleteGhbbByghny",list)>0)
            return true;
        else
            return false;
	}

	@Override
	public boolean deleteGhXmtjbbByghny(Excel_list list) {
        if(delete("deleteGhXmtjbbByghny",list)>0)
            return true;
        else
            return false;
	}

	@Override
	public List<Excel_list> getTjbb(Excel_list elist) {
		if("bzsrzcb".equals(elist.getXmlx()))
		return queryList("getTjbbOfbzsrzcb",elist);
		else if("bycbb".equals(elist.getXmlx()))
			return queryList("getTjbbOfbycbb",elist);
		else if("zjbdb".equals(elist.getXmlx()))
			return queryList("getTjbbOfzjbdb",elist);
		else if("srzcb".equals(elist.getXmlx()))
			return queryList("getTjbbOfsrzcb",elist);
		else if("zxqkb".equals(elist.getXmlx()))
			return queryList("getTjbbOfzxqkb",elist);
		else if("zcfzb".equals(elist.getXmlx()))
			return queryList("getTjbbOfzcfzb",elist);
		else
			return null;
	}

	@Override
	public List<Excel_list> getZjsymxb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=new ArrayList<Excel_list>();
		if("N".equals(elist.getSfxszrc())) {
			l=queryList("getZjsymxbzj",elist);
			System.out.println("=========1.size"+l.size());
			l1=queryList("getZjsymxb",elist);
			System.out.println("=========11.size"+l1.size());
		}else {
			l=queryList("getZjsymxbzjzrc",elist);
			l1=queryList("getZjsymxbzrc",elist);
		}
		/*int k=1;
		for (Excel_list e : l1) {
			e.setV_0(k+"");k++;
		}*/
		// System.out.println("=========1.size"+l.size());
		l.addAll(l1);
		// System.out.println("=========1.size"+l.size());
		return l;
	}

	@Override
	public List<Excel_list> getZjsydwhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		
		List<Excel_list> l1=null;
		List<Excel_list> l2=null;

			if("按地市".equals(elist.getHjlx())){
				l=queryList("getZjsydwhzbhjds",elist);
				l1=queryList("getZjsydwhzbhzds",elist);
				for (int i = 0; i < l1.size(); i++) {
					l.add(l1.get(i));
				}
				
			}else{
				l=queryList("getZjsydwhzbhj",elist);
				l1=queryList("getZjsydwhzbhzds",elist);
				l2=queryList("getZjsydwhzbhz",elist);
				int k=0;
				for (int i = 0; i < l1.size(); i++) {
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						l1.get(i).setV_1(l1.get(i).getV_1()+"合计");
					}
					l.add(l1.get(i));
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						for (int j = k; j < l2.size(); j++) {
							if(l1.get(i).getGydwdm().equals(l2.get(j).getGydwdm().substring(0, 1).equals("1") ? "11101"+l2.get(j).getGydwdm().substring(5,9)+"00" : l2.get(j).getGydwdm().substring(0,9)+"00" )) {
								l.add(l2.get(j)); k++;
							}else {
								break;
							}
						}
					}
				}
				
			}
	
		
		return l;
	}
	
	@Override
	public List<Excel_list> getZjsyxmhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=new ArrayList<Excel_list>();
//		if("N".equals(elist.getSfxszrc())) {
			l=queryList("getZjsyxmhzbhj",elist);
			l1=queryList("getZjsyxmhzbhz",elist);
		/*}else {
			l=queryList("getZjsyxmhzbhjzrc",elist);
			l1=queryList("getZjsyxmhzbhzzrc",elist);
		}*/
		
		
		for (int i = 0; i < l1.size(); i++) {
			l.add(l1.get(i));
		}
		
		return l;
	}
		
	
	@Override
	public List<Excel_tilte> getSbzjxbmxbBtDc(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=new ArrayList<Excel_list>();
		List<Excel_list> l2=new ArrayList<Excel_list>();

			l=queryList("getSbzjxbmxbBTsl",elist);
			l1=queryList("getSbzjxbmxbBT",elist);
			List<Excel_tilte> et=new ArrayList<Excel_tilte>();
			et.add(new Excel_tilte("设区市局",1,3,0,0));
			et.add(new Excel_tilte("计划",1,1,1,3));
			et.add(new Excel_tilte("请款",1,1,4,7));
			et.add(new Excel_tilte("未请款",1,3,8,8));
			int y1=9;
			for(int i=0;i<l.size();i++){
				et.add(new Excel_tilte(l.get(i).getXmmc(),1,1,y1,y1+Integer.valueOf(l.get(i).getV_0())+3-1));
				y1=y1+Integer.valueOf(l.get(i).getV_0())+3;
			}
			
			et.add(new Excel_tilte("计划合计",2,3,1,1));
			et.add(new Excel_tilte("本年度计划",2,3,2,2));
			et.add(new Excel_tilte("以前年度计划",2,3,3,3));
			et.add(new Excel_tilte("累计请款",2,3,4,4));
			et.add(new Excel_tilte("本年度请款合计",2,3,5,5));
			et.add(new Excel_tilte("本年度计划请款",2,3,6,6));
			et.add(new Excel_tilte("以前年度计划请款",2,3,7,7));
			
			int y2=9;
			for(int i=0;i<l.size();i++){
				if( (Integer.valueOf(l.get(i).getV_0())+3)%2==0){
					et.add(new Excel_tilte(l.get(i).getV_1(),2,2,y2,y2+(Integer.valueOf(l.get(i).getV_0())+3)/2-1 ));
					y2=y2+(Integer.valueOf(l.get(i).getV_0())+3)/2;
					
					et.add(new Excel_tilte(l.get(i).getV_2(),2,2,y2,y2+(Integer.valueOf(l.get(i).getV_0())+3)/2-1));
					y2=y2+(Integer.valueOf(l.get(i).getV_0())+3)/2;
					

				}else{
					
					et.add(new Excel_tilte(l.get(i).getV_1(),2,2,y2,y2+(Integer.valueOf(l.get(i).getV_0())+3)/2-1));
					y2=y2+(Integer.valueOf(l.get(i).getV_0())+3)/2;
					
					et.add(new Excel_tilte(l.get(i).getV_2(),2,2,y2,y2+(Integer.valueOf(l.get(i).getV_0())+3)/2+1-1));
					y2=y2+(Integer.valueOf(l.get(i).getV_0())+3)/2+1;
					
					
				}
				
			}
			String xmmc="";
			int y3=9;
			int k=0;
			for(int i=0;i<l.size();i++){
				xmmc=l.get(i).getXmmc();
				
				et.add(new Excel_tilte("计划金额",3,3,y3,y3));
				y3=y3+1;
				et.add(new Excel_tilte("小计",3,3,y3,y3));
				y3=y3+1;
				for(int j=k;j<l1.size();j++){
					if(xmmc.equals(l1.get(j).getXmmc())){
						et.add(new Excel_tilte("实际拨付金额("+l1.get(j).getV_0()+")",3,3,y3,y3));
						y3=y3+1;
						k++;
					}else{
						break;
					}
				}
				et.add(new Excel_tilte("未拨金额",3,3,y3,y3));
				y3=y3+1;
			}
			
		return et;
	}

    @Override
    public List<Excel_tilte> getSbzjtrqkxbmxbBtDc(Excel_list elist) {
        List<Excel_list> l=new ArrayList<Excel_list>();
        List<Excel_list> l1=new ArrayList<Excel_list>();
        List<Excel_list> l2=new ArrayList<Excel_list>();

        l=queryList("getSbzjtrqkbbt",elist);
//        l1=queryList("getSbzjtrqkbbt",elist);
        List<Excel_tilte> et=new ArrayList<Excel_tilte>();
        et.add(new Excel_tilte("设区市局",1,3,0,0));
        et.add(new Excel_tilte("合计",1,3,1,1));
        et.add(new Excel_tilte("中央车购税补助",1,3,2,2));
        et.add(new Excel_tilte("省级补助",1,3,3,3));
        et.add(new Excel_tilte("地级市财政",1,3,4,4));
        et.add(new Excel_tilte("县(区)财政",1,3,5,5));
        et.add(new Excel_tilte("其它资金",1,3,6,6));
        et.add(new Excel_tilte("公投资金",1,3,7,7));
        int y1=8;
        for(int i=0;i<l.size();i++){
            et.add(new Excel_tilte(l.get(i).getXmmc(),1,1,y1,y1+6));
            y1=y1+7;
        }

//        et.add(new Excel_tilte("计划合计",2,3,1,1));
//        et.add(new Excel_tilte("本年度计划",2,3,2,2));
//        et.add(new Excel_tilte("以前年度计划",2,3,3,3));
//        et.add(new Excel_tilte("累计请款",2,3,4,4));
//        et.add(new Excel_tilte("本年度请款合计",2,3,5,5));
//        et.add(new Excel_tilte("本年度计划请款",2,3,6,6));
//        et.add(new Excel_tilte("以前年度计划请款",2,3,7,7));

        int y2=8;
        for(int i=0;i<l.size();i++){
                et.add(new Excel_tilte(l.get(i).getV_1(),2,2,y2,y2+2));
                y2=y2+3;

                et.add(new Excel_tilte(l.get(i).getV_2(),2,2,y2,y2+3));
                y2=y2+4;
        }


        String xmmc="";
        int y3=8;
//        int k=0;
        for(int i=0;i<l.size();i++){
            xmmc=l.get(i).getXmmc();

            et.add(new Excel_tilte("小计",3,3,y3,y3));
            y3=y3+1;
            et.add(new Excel_tilte("中央车购税补助",3,3,y3,y3));
            y3=y3+1;

			et.add(new Excel_tilte("省级补助",3,3,y3,y3));
			y3=y3+1;
			et.add(new Excel_tilte("地级市财政",3,3,y3,y3));
			y3=y3+1;
			et.add(new Excel_tilte("县(区)财政",3,3,y3,y3));
			y3=y3+1;
			et.add(new Excel_tilte("其它资金",3,3,y3,y3));
			y3=y3+1;
			et.add(new Excel_tilte("公投资金",3,3,y3,y3));
			y3=y3+1;
        }

        return et;
    }


    @Override
    public List<Excel_tilte> getPtglcgszjjsjhhzbBtDc(Excel_list elist) {
        List<Excel_list> l=new ArrayList<Excel_list>();
        List<Excel_list> l1=new ArrayList<Excel_list>();
        List<Excel_list> l2=new ArrayList<Excel_list>();

        l=queryList("getPtglcgszjjsjhhzbBt",elist);
//        l1=queryList("getSbzjtrqkbbt",elist);
        List<Excel_tilte> et=new ArrayList<Excel_tilte>();
        et.add(new Excel_tilte("设区市",1,3,0,0));

		int countGsd = 0;
		int countNc = 0;
		int countPre = 0;
		int countPreee = 0;
		for(int i=0;i<l.size();i++) {
			if(l.get(i).getXmdj().equals("国省道")){
				countGsd++;
			}else{
				countNc++;
			}
		}
        countPre = (countGsd == 0 || countNc == 0) ? 3:4;

		countPreee = (countGsd == 0 || countNc == 0) ? 2:3;

		et.add(new Excel_tilte("车购税资金合计（万元）",1,2,1,countPreee));

		if(countGsd==0){
			et.add(new Excel_tilte("农村",1,2,countPre-1+countGsd+1,countPre-1+countGsd+countNc));
		}else if(countNc==0){
			et.add(new Excel_tilte("国省道",1,2,countPre,countPre-1+countGsd));
		}else{
			et.add(new Excel_tilte("国省道",1,2,countPre,countPre-1+countGsd));
			et.add(new Excel_tilte("农村",1,2,countPre-1+countGsd+1,countPre-1+countGsd+countNc));
		}


        et.add(new Excel_tilte("全省合计",3,3,1,1));
        if(countGsd==0){
			et.add(new Excel_tilte("农村",3,3,2,2));
		}else if(countNc==0){
			et.add(new Excel_tilte("国省道",3,3,2,2));
		}else {
			et.add(new Excel_tilte("国省道", 3, 3, 2, 2));
			et.add(new Excel_tilte("农村",3,3,3,3));
		}

        int y1=countPre;
        for(int i=0;i<l.size();i++){
            et.add(new Excel_tilte(l.get(i).getV_0(),3,3,y1,y1));
            y1=y1+1;
        }

        return et;
    }

	    @Override
		public List<Excel_list> getSbzjxbmxbBt(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
			List<Excel_list> l1=new ArrayList<Excel_list>();
	 		List<Excel_list> l2=new ArrayList<Excel_list>();
	//		if("N".equals(elist.getSfxszrc())) {
				//l=queryList("getSbzjxbmxbDW",elist);
				//l1=queryList("getSbzjxbmxbMX",elist);
				l=queryList("getSbzjxbmxbBTsl",elist);//只用第一个
				l1=queryList("getSbzjxbmxbBT",elist);
				String bt="";
			if(l.size()>0){	
				bt=bt+"<tr><td rowspan='3' style='width:100px;'>设区市局</td>";
				bt=bt+"<td colspan='3'>计划</td><td colspan='4'>请款</td><td rowspan='3'>未请款</td>";
				for(int i=0;i<l.size();i++){
					bt=bt+"<td colspan='"+(Integer.valueOf(l.get(i).getV_0())+3)+"'>"+l.get(i).getXmmc()+"</td>";
				}
				bt=bt+"</tr>";
				bt=bt+"<td rowspan='2'>计划合计</td><td rowspan='2'>本年度计划</td><td rowspan='2' style='width:80px;'>以前年度计划</td>";
				bt=bt+"<td rowspan='2'>累计请款</td><td rowspan='2'>本年度请款合计</td><td rowspan='2'>本年度计划请款</td><td rowspan='2' style='width:80px;'>以前年度计划请款</td>";
				for(int i=0;i<l.size();i++){
					if( (Integer.valueOf(l.get(i).getV_0())+3)%2==0){
						bt=bt+"<td colspan='"+(Integer.valueOf(l.get(i).getV_0())+3)/2+"'>"+l.get(i).getV_1()+"</td>";
						bt=bt+"<td colspan='"+(Integer.valueOf(l.get(i).getV_0())+3)/2+"'>"+l.get(i).getV_2()+"</td>";
					}else{
						bt=bt+"<td colspan='"+(Integer.valueOf(l.get(i).getV_0())+3)/2+"'>"+l.get(i).getV_1()+"</td>";
						bt=bt+"<td colspan='"+((Integer.valueOf(l.get(i).getV_0())+3)/2+1)+"'>"+l.get(i).getV_2()+"</td>";
					}
					
				}
				bt=bt+"</tr>";
				String xmmc="";
				int k=0;
				for(int i=0;i<l.size();i++){
					xmmc=l.get(i).getXmmc();
					bt=bt+"<td>计划金额</td><td>小计</td>";
					for(int j=k;j<l1.size();j++){
						if(xmmc.equals(l1.get(j).getXmmc())){
							bt=bt+"<td>实际拨付金额("+l1.get(j).getV_0()+")</td>";
							k++;
						}else{
							break;
						}
					}
					
					bt=bt+"<td>未拨金额</td>";
				}
				bt=bt+"</tr>";
				Excel_list el=new Excel_list();
				el.setV_0(bt);
				l2.add(el);
			}
			System.out.println("====="+bt);
			
			
			return l2;
		}
	    @Override
		public List<Excel_list> getSbzjtrqkbbt(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
	 		List<Excel_list> l2=new ArrayList<Excel_list>();
				l=queryList("getSbzjtrqkbbt",elist);//只用第一个
				String bt="";
			if(l.size()>0){
				bt=bt+"<tr><td rowspan='3' style='width:100px;'>设区市局</td>";
				bt=bt+"<td rowspan='3'>合计</td><td rowspan='3'>中央车购税补助</td><td rowspan='3'>省级补助</td>" +
						"<td rowspan='3'>地级市财政</td><td rowspan='3'>县(区)财政</td><td rowspan='3'>其它资金</td><td rowspan='3'>公投资金</td>";
				for(int i=0;i<l.size();i++) {
					bt = bt + "<td colspan='7'>" + l.get(i).getXmmc() + "</td>";
					if (i == (l.size() - 1)) {
						bt = bt + "</tr>";
					}
				}
				for(int i=0;i<l.size();i++) {
					if(i==0){
						bt=bt+"<tr>";
					}
					bt=bt+"<td colspan='3'>"+l.get(i).getV_1()+"</td>";
					bt=bt+"<td colspan='4'>"+l.get(i).getV_2()+"</td>";
					if(i == (l.size()-1) ){
						bt=bt+"</tr>";
					}
				}
				for(int i=0;i<l.size();i++) {
					if(i==0){
						bt=bt+"<tr>";
					}
					bt=bt+"<td>小计</td>";
					bt=bt+"<td>中央车购税补助</td>";
					bt=bt+"<td>省级补助</td>";
					bt=bt+"<td>地级市财政</td>";
					bt=bt+"<td>县(区)财政</td>";
					bt=bt+"<td>其它资金</td>";
					bt=bt+"<td>公投资金</td>";
					if(i == (l.size()-1) ){
						bt=bt+"</tr>";
					}
				}

	      }
				Excel_list el=new Excel_list();
				el.setV_0(bt);
				l2.add(el);
			System.out.println("====="+bt);
			return l2;
		}

	    @Override
		public List<Excel_list> getPtglcgszjjsjhhzbBt(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
	 		List<Excel_list> l2=new ArrayList<Excel_list>();
				l=queryList("getPtglcgszjjsjhhzbBt",elist);//只用第一个
				String bt="";
				int countGsd = 0;
				int countNc = 0;
				int countPre = 0;
			if(l.size()>0){
				bt=bt+"<tr><td rowspan='3' style='width:100px;'>设区市</td>";

				for(int i=0;i<l.size();i++) {
					if(l.get(i).getXmdj().equals("国省道")){
						countGsd++;
					}else{
						countNc++;
					}
				}

				countPre = (countGsd == 0 || countNc == 0) ? 2:3;

				bt=bt+"<td rowspan='2' colspan='"+countPre +"' style='width:100px;'>车购税资金合计（万元）</td>";


				if(countGsd != 0){
					bt = bt + "<td colspan= '"+countGsd +"'>" + "国省道" + "</td>";
				}
				if(countNc != 0){
					bt = bt + "<td colspan= '"+countNc +"'>" + "农村" + "</td>";
				}

				bt = bt + "</tr>";
				bt=bt+"<tr>";

				bt=bt+"<tr><td>合计</td>";
				if(countGsd != 0){
					bt=bt+"<td>国省道</td>";
				}
				if(countNc != 0){
					bt=bt+"<td>农村</td>";
				}
//				bt=bt+"<td>合计</td><td>国省道</td><td>农村</td>";

				for(int i=0;i<l.size();i++) {
					bt=bt+"<td colspan='1'>"+l.get(i).getV_0()+"</td>";
					if(i == (l.size()-1) ){
						bt=bt+"</tr>";
					}
				}

//				bt=bt+"<tr>";
//				bt=bt+"<td>合计</td><td>国省道</td><td>农村</td>";

	      }
				Excel_list el=new Excel_list();
				el.setV_0(bt);
				l2.add(el);
			System.out.println("====="+bt);
			return l2;
		}

		@Override
		public List<Excel_tilte> getSbzjjhqkmxbbtDc(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
			l=queryList("getSbzjjhqkmxbbt",elist);
				List<Excel_tilte> et=new ArrayList<Excel_tilte>();
				et.add(new Excel_tilte("序号",1,1,0,0));
				et.add(new Excel_tilte("项目名称",1,1,1,1));
				et.add(new Excel_tilte("厅文号",1,1,2,2));
				et.add(new Excel_tilte("局文号",1,1,3,3));
				et.add(new Excel_tilte("计划金额",1,1,4,4));
				for(int i=0;i<l.size();i++){
					et.add(new Excel_tilte(l.get(i).getYf()+"月请款",1,1,5+i,5+i));
				}
				et.add(new Excel_tilte("本年度请款",1,1,5+l.size(),5+l.size()));
				et.add(new Excel_tilte("累计请款",1,1,6+l.size(),6+l.size()));
				et.add(new Excel_tilte("未请款数",1,1,7+l.size(),7+l.size()));
				et.add(new Excel_tilte("备注",1,1,8+l.size(),8+l.size()));
				
			return et;
		}
		@Override
		public List<Excel_list> getSbzjjhqkmxbbt(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
			List<Excel_list> l1=new ArrayList<Excel_list>();
	 //		List<Excel_list> l2=new ArrayList<Excel_list>();
	//		if("N".equals(elist.getSfxszrc())) {
				//l=queryList("getSbzjxbmxbDW",elist);
				//l1=queryList("getSbzjxbmxbMX",elist);
				l=queryList("getSbzjjhqkmxbbt",elist);
				String bt="";
			if(l.size()>0){	
				bt=bt+"<tr><td >序号</td><td >项目名称</td><td >厅文号</td><td >局文号</td><td >计划金额</td>";
				for(int i=0;i<l.size();i++){
					bt=bt+"<td >"+l.get(i).getYf()+"月请款</td>";
				}
				bt=bt+"<td >本年度请款</td><td >累计请款</td><td >未请款数</td><td >备注</td></tr>";
			}	
			Excel_list el=new Excel_list();
			el.setV_0(bt);
			l1.add(el);
			
			return l1;
		}
		@Override
		public String [][] getSbzjxbmxb(Excel_list elist) {
			System.out.println("进入server方法");
			List<Excel_list> l=new ArrayList<Excel_list>();
			List<Excel_list> l1=new ArrayList<Excel_list>();
	 		List<Excel_list> l2=new ArrayList<Excel_list>();
	 		List<Excel_list> l4=new ArrayList<Excel_list>();
	 		List<Excel_list> l5=new ArrayList<Excel_list>();
               // System.out.println(elist.toString()+elist.get);
				
				l1=queryList("getSbzjxbmxbDW",elist);
				l2=queryList("getSbzjxbmxbMX",elist);
				l4=queryList("getSbzjxbmxbBTsl",elist);
				l5=queryList("getSbzjxbmxbMXsl",elist);
				l=queryList("getSbzjxbmxbBT",elist);
				System.out.println("l2.size"+l2.size());
				int length=0;
				for(int a=0;a<l4.size();a++){
					length=length+Integer.valueOf(l4.get(a).getV_0());
				}
				length=length+l4.size()*3+10;
				System.out.println("length::"+length);
				String arr[][] =new  String[l1.size()+1][length];
				
				String xmmc="";
				System.out.println("wwwwwwww");
				int m=0;
				int n=0;
				
				int a=0;
				int b=0;
				
				for (int i=0;i<arr.length;i++){
					for (int j=0;j<length;j++){
						arr[i][j]=" ";
					}
				}
				for(int o=b;o<l5.size();o++){
				for (int i=1;i<l1.size()+1;i++){
					m=0;
					arr[i][0]=length+"";
					arr[i][1]=l1.get(i-1).getV_1();
					arr[i][2]=l1.get(i-1).getV_7();
					arr[i][3]=l1.get(i-1).getV_8();
					arr[i][4]=l1.get(i-1).getV_9();
					arr[i][5]=l1.get(i-1).getV_10();
					arr[i][6]=l1.get(i-1).getV_11();
					arr[i][7]=l1.get(i-1).getV_12();
					arr[i][8]=l1.get(i-1).getV_13();
					arr[i][9]=l1.get(i-1).getV_14();
					for(int k=0;k<l.size();k++){
						/*xmmc=l.get(k).getXmmc();
						if(k==0){
							if(!l5.get(o).getXmmc().equals(l.get(k).getXmmc())){
								m=m+3;
							}
							
						}
						if(!xmmc.equals(l.get(k).getXmmc())){
							m=m+3;
						}*/
						if(k==0){
							xmmc=l.get(k).getXmmc();
						}
						if(!xmmc.equals(l.get(k).getXmmc())){
							m=m+3;
						}
						xmmc=l.get(k).getXmmc();
						
							
							if(l5.get(o).getV_1().equals(l1.get(i-1).getV_1()) 
									&& l5.get(o).getXmmc().equals(l.get(k).getXmmc())
									){
								//System.out.println("m::"+m+"k::"+k);
								n=Integer.valueOf(l5.get(o).getV_0());
								arr[i][9+m+k+1]=l5.get(o).getV_6();
								arr[i][9+m+k+2]=l5.get(o).getV_7();
								arr[i][9+m+k+n+3]=l5.get(o).getV_8();
								for(int c=0;c<n;c++){
									
									if(     a<l2.size() &&
											l2.get(a).getV_1().equals(l1.get(i-1).getV_1()) 
											&& l2.get(a).getV_3().equals(l.get(k+c).getXmmc())
											&&l2.get(a).getV_8().equals(l.get(k+c).getV_0())){
										arr[i][9+m+k+3+c]=l2.get(a).getV_7();
										a++;
										
									}
								}
								k=k+n;
							}else{
								b=o;
							}
						}
			        }
				}
				System.out.println("===========");
				arr[0][0]=length+"";arr[0][1]="合计";
				for (int j=2;j<length;j++){
					arr[0][j]=0+"";
				}
				for (int i=1;i<arr.length;i++){
					for (int j=2;j<length;j++){
						if(!"".equals(arr[i][j].trim())){
							arr[0][j]=new  BigDecimal(arr[0][j].trim()).add(new  BigDecimal(arr[i][j].trim())).toString();
									
						}
						
					}
				}
				System.out.println("------------");
			return arr;
		}
		@Override
		public String [][] getSbzjtrqkb(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
			List<Excel_list> l1=new ArrayList<Excel_list>();

			l=queryList("getSbzjtrqkbbt",elist);//查询表头
			l1=queryList("getSbzjtrqkb",elist);//查询表体

			List<String> l0=new ArrayList<String>();

			int btCount = 0;
			String dmmc = l1.get(0).getDwmc();
			l0.add("合计");//给合计占位
			l0.add(dmmc);
			for (int i=0;i<l1.size();i++){
				if(!dmmc.equals(l1.get(i).getDwmc())){
					btCount++;
					dmmc = l1.get(i).getDwmc();
					l0.add(dmmc);
				}
			}
			//l0单位的数组

				int length = l.size()*7;
				String arr[][] =new  String[btCount+2][length+8];//btCount+1表示所有行数，再加1表示合计，给合计占位
				String xmmc="";
				//先赋空值
				for (int i=0;i<arr.length;i++){
					for (int j=0;j<length+8;j++){
						arr[i][j]="0";
					}
				}

			for(int i=0;i<l1.size();i++){//第一层循坏是表体的数组
				for (int j=1;j<l0.size();j++){//第二层循环单位数组
					for (int k=0;k<l.size();k++){//第三层循坏项目表头的数组
						if(l1.get(i).getDwmc().equals(l0.get(j)) && l1.get(i).getXmmc().equals(l.get(k).getXmmc())){
							arr[j][0] = l1.get(i).getDwmc();

							if(!"".equals(arr[j][1].trim())){
								arr[j][1] = new BigDecimal(arr[j][1].trim()).add(new BigDecimal(l1.get(i).getV_0().trim())).toString();
							}else{
								arr[j][1] += l1.get(i).getV_0();//累加的总合计
							}

							if(!"".equals(arr[j][2].trim())){
								arr[j][2] = new BigDecimal(arr[j][2].trim()).add(new BigDecimal(l1.get(i).getV_1().trim())).toString();
							}else{
								arr[j][2] += l1.get(i).getV_1();//累加的中央车购税补助
							}

							if(!"".equals(arr[j][3].trim())){
								arr[j][3] = new BigDecimal(arr[j][3].trim()).add(new BigDecimal(l1.get(i).getV_2().trim())).toString();
							}else{
								arr[j][3] += l1.get(i).getV_2();//累加的省级补助
							}

							if(!"".equals(arr[j][4].trim())){
								arr[j][4] = new BigDecimal(arr[j][4].trim()).add(new BigDecimal(l1.get(i).getV_3().trim())).toString();
							}else{
								arr[j][4] += l1.get(i).getV_3();//累加的地级市财政
							}

							if(!"".equals(arr[j][5].trim())){
								arr[j][5] = new BigDecimal(arr[j][5].trim()).add(new BigDecimal(l1.get(i).getV_4().trim())).toString();
							}else{
								arr[j][5] += l1.get(i).getV_4();//累加的县(区)财政
							}

							if(!"".equals(arr[j][6].trim())){
								arr[j][6] = new BigDecimal(arr[j][6].trim()).add(new BigDecimal(l1.get(i).getV_5().trim())).toString();
							}else{
								arr[j][6] += l1.get(i).getV_5();//累加的其它资金
							}
							
							if(!"".equals(arr[j][7].trim())){
								arr[j][7] = new BigDecimal(arr[j][7].trim()).add(new BigDecimal(l1.get(i).getV_6().trim())).toString();
							}else{
								arr[j][7] += l1.get(i).getV_6();//累加的公投资金
							}

							arr[j][k*7+8] =  l1.get(i).getV_0();
							arr[j][k*7+9] =  l1.get(i).getV_1();
							arr[j][k*7+10] =  l1.get(i).getV_2();
							arr[j][k*7+11] =  l1.get(i).getV_3();
							arr[j][k*7+12] =  l1.get(i).getV_4();
							arr[j][k*7+13] =  l1.get(i).getV_5();
							arr[j][k*7+14] =  l1.get(i).getV_6();

						}
					}
				}
			}



			arr[0][0]="合计";
			for (int j=1;j<length+8;j++){
				arr[0][j]=0+"";
			}

				for (int i=1;i<arr.length;i++){
					for (int j=1;j<length+8;j++){
						if(!"".equals(arr[i][j].trim())){
							arr[0][j]=new  BigDecimal(arr[0][j].trim()).add(new  BigDecimal(arr[i][j].trim())).toString();

						}

					}
				}

//				arr[0][0]=length+"";	arr[0][1]="合计";
//				for (int j=2;j<length;j++){
//					arr[0][j]=0+"";
//				}

//				for (int i=1;i<arr.length;i++){
//					for (int j=2;j<length;j++){
//						if(!"".equals(arr[i][j].trim())){
//							arr[0][j]=new  BigDecimal(arr[0][j].trim()).add(new  BigDecimal(arr[i][j].trim())).toString();
//
//						}
//
//					}
//				}

			return arr;
		}


		@Override
		public String [][] getPtglcgszjjsjhhzbBtmx(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
			List<Excel_list> l1=new ArrayList<Excel_list>();

			l=queryList("getPtglcgszjjsjhhzbBt",elist);//查询表头
			l1=queryList("getPtglcgszjjsjhhzbBtmx",elist);//查询表体

			List<String> l0=new ArrayList<String>();//l0单位的数组

			int btCount = 0;
			String dmmc = l1.get(0).getGydw();
			l0.add("全省合计");//给合计占位
			l0.add(dmmc);
			for (int i=0;i<l1.size();i++){
				if(!dmmc.equals(l1.get(i).getGydw())){
					btCount++;
					dmmc = l1.get(i).getGydw();
					l0.add(dmmc);
				}
			}
			int countGsd = 0;
			int countNc = 0;
			int preCount=0;//前面的国省道或者农村不一定有


			for(int i=0;i<l.size();i++) {
				if(l.get(i).getXmdj().equals("国省道")){
					countGsd++;
				}else{
					countNc++;
				}
			}
			preCount = (countGsd==0 || countNc==0)? 3: 4;

				int length = countGsd+countNc;
				String arr[][] =new  String[btCount+2][length+preCount];//btCount+1表示所有行数，再加1表示合计，给合计占位
				String xmmc="";
				//先赋空值
				for (int i=0;i<arr.length;i++){//arr.length指的是二维数组的行数
					for (int j=0;j<length+preCount;j++){
						arr[i][j]="0";
					}
				}

			for(int i=0;i<l1.size();i++){//第一层循坏是表体的数组
				for (int j=1;j<l0.size();j++){//第二层循环单位数组
					for (int k=0;k<l.size();k++){//第三层循坏项目表头的数组
						if(l1.get(i).getGydw().equals(l0.get(j)) && l1.get(i).getXmdj().equals(l.get(k).getXmdj()) && l1.get(i).getJsxz().equals(l.get(k).getV_0())){
							arr[j][0] = l1.get(i).getGydw();

							if(!"".equals(arr[j][1].trim())){
								arr[j][1] = new BigDecimal(arr[j][1].trim()).add(new BigDecimal(l1.get(i).getV_0().trim())).toString();
							}

							if(!"".equals(arr[j][2].trim()) && l1.get(i).getXmdj().equals("国省道")){

								arr[j][2] = new BigDecimal(arr[j][2].trim()).add(new BigDecimal(l1.get(i).getV_0().trim())).toString();
							}

							if(countGsd==0){
								arr[j][2] = new BigDecimal(arr[j][2].trim()).add(new BigDecimal(l1.get(i).getV_0().trim())).toString();
							}else {
								if(!"".equals(arr[j][3].trim())  && l1.get(i).getXmdj().equals("农村")){
									arr[j][3] = new BigDecimal(arr[j][3].trim()).add(new BigDecimal(l1.get(i).getV_0().trim())).toString();
								}
							}

							arr[j][preCount+k] =  l1.get(i).getV_0();
						}
					}
				}
			}

			arr[0][0]="全省合计";
			for (int j=1;j<length+preCount;j++){
				arr[0][j]=0+"";
			}

				for (int i=1;i<arr.length;i++){
					for (int j=1;j<length+preCount;j++){
						if(!"".equals(arr[i][j].trim())){
							arr[0][j]=new  BigDecimal(arr[0][j].trim()).add(new  BigDecimal(arr[i][j].trim())).toString();

						}

					}
				}

			return arr;
		}

		
		@Override
		public String [][] getSbzjjhqkmxb(Excel_list elist) {
			List<Excel_list> l=new ArrayList<Excel_list>();
			List<Excel_list> l1=new ArrayList<Excel_list>();
	 		List<Excel_list> l2=new ArrayList<Excel_list>();

               // System.out.println(elist.toString()+elist.get);
				
				l=queryList("getSbzjjhqkmxbbt",elist);
				l1=queryList("getSbzjjhqkmxb",elist);
				l2=queryList("getSbzjjhqklxsl",elist);
				  
				int length=9+l.size();
				String arr[][] =new  String[l2.size()+1][length];
				String xmnf="";
				String xmdj=""; 
				String xmmc="";
				for(int i=0;i<arr.length;i++){
					for(int j=0;j<4;j++){
						arr[i][j]=" ";
					}
					for(int j=4;j<arr[i].length-1;j++){
						arr[i][j]="0";
					}
					arr[i][length-1]=" ";
				}
					
                int m=0;//记录总的行数
                int n=0;//记录类型内部的行数
                int k=1;//记录几种类型
                
                for(int i=0;i<l1.size();i++){
                	//System.out.println("xmmc=========="+l1.get(i).getXmmc());
                	String s= l1.get(i).getYf();
					if(i==0){
						xmnf=l1.get(0).getXmnf();
						xmdj=l1.get(0).getXmdj();
						xmmc=l1.get(0).getXmmc();
						//总计
						arr[m][0]=" ";
						arr[m][1]="合    计";
						arr[m][4]=Double.parseDouble(l1.get(i).getV_2())+"";
						arr[m][4+l.size()+1]="0";
						arr[m][4+l.size()+2]=Double.parseDouble(l1.get(i).getV_3())+"";
						if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
							arr[m][4+l.size()+1]=Double.parseDouble(l1.get(i).getV_3())+"";
							for(int j=0;j<l.size();j++){
								if( s.equals(l.get(j).getYf()) ){
									arr[m][5+j]=Double.parseDouble(l1.get(i).getV_3())+"";
								}
							}
						}
						m++;
						//小计
						arr[m][0]="一";
						arr[m][1]=l1.get(i).getXmnf()+l1.get(i).getXmdj();
						arr[m][4]=l1.get(i).getV_2();
						arr[m][4+l.size()+1]="0";
						arr[m][4+l.size()+2]=l1.get(i).getV_3();
						if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
							arr[m][4+l.size()+1]=l1.get(i).getV_3();
							for(int j=0;j<l.size();j++){
								if( s.equals(l.get(j).getYf()) ){
									arr[m][5+j]=l1.get(i).getV_3();
								}
							}
						}
						m++;
						k++;
						//第一行
						arr[m][0]=(n+1)+"";
						arr[m][1]=l1.get(i).getXmmc();
						arr[m][2]=l1.get(i).getV_0();
						arr[m][3]=l1.get(i).getV_1();
						arr[m][4]=l1.get(i).getV_2()+"";
						arr[m][4+l.size()+1]="0";
						arr[m][4+l.size()+2]=Double.parseDouble(l1.get(i).getV_3())+"";
						if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
							arr[m][4+l.size()+1]=Double.parseDouble(l1.get(i).getV_3())+"";
							for(int j=0;j<l.size();j++){
								if( s.equals(l.get(j).getYf()) ){
									arr[m][5+j]=Double.parseDouble(l1.get(i).getV_3())+"";
								}
							}
						}
						m++;
						n++;
					}else{
						//第二行开始
						if(xmmc.equals(l1.get(i).getXmmc())){
							//总结
							arr[0][4+l.size()+2]=new  BigDecimal(arr[0][4+l.size()+2]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
									
							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
								arr[0][4+l.size()+1]=new  BigDecimal(arr[0][4+l.size()+1]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
								for(int j=0;j<l.size();j++){
									if( s.equals(l.get(j).getYf()) ){
										arr[0][5+j]=new  BigDecimal(arr[0][5+j]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
									}
								}
							}
							
							//小计
							arr[m-n-1][4+l.size()+2]=new  BigDecimal(arr[m-n-1][4+l.size()+2]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
								arr[m-n-1][4+l.size()+1]=new  BigDecimal(arr[m-n-1][4+l.size()+1]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
								for(int j=0;j<l.size();j++){
									if( s.equals(l.get(j).getYf()) ){
										arr[m-n-1][5+j]=new  BigDecimal(arr[m-n-1][5+j]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
									}
								}
							}						
							
							//本行数据处理
							arr[m-1][4+l.size()+2]=new  BigDecimal(arr[m-1][4+l.size()+2]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
								//System.out.println("m::::::::"+m+":arr[m-1][4+l.size()+1]::"+arr[m-1][4+l.size()+1]+":xmmc:"+l1.get(i).getXmmc());
								arr[m-1][4+l.size()+1]=new  BigDecimal(arr[m-1][4+l.size()+1]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
								for(int j=0;j<l.size();j++){
									if( s.equals(l.get(j).getYf()) ){
										arr[m-1][5+j]=Double.parseDouble(l1.get(i).getV_3())+"";
									}
								}
							}
						
						}
                       if( !xmmc.equals(l1.get(i).getXmmc()) && xmdj.equals(l1.get(i).getXmdj())) {
                    	   
                    	 //总结
                    	    arr[0][4]=new  BigDecimal(arr[0][4]).add(new  BigDecimal(l1.get(i).getV_2())).toString();
							arr[0][4+l.size()+2]=new  BigDecimal(arr[0][4+l.size()+2]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
								arr[0][4+l.size()+1]=new  BigDecimal(arr[0][4+l.size()+1]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
								for(int j=0;j<l.size();j++){
									if( s.equals(l.get(j).getYf()) ){
										arr[0][5+j]=new  BigDecimal(arr[0][5+j]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
									}
								}
							}
							
							//小计
							arr[m-n-1][4]=new  BigDecimal(arr[m-n-1][4]).add(new  BigDecimal(l1.get(i).getV_2())).toString();
							arr[m-n-1][4+l.size()+2]=new  BigDecimal(arr[m-n-1][4+l.size()+2]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
								arr[m-n-1][4+l.size()+1]=new  BigDecimal(arr[m-n-1][4+l.size()+1]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
								for(int j=0;j<l.size();j++){
									if( s.equals(l.get(j).getYf()) ){
										arr[m-n-1][5+j]=new  BigDecimal(arr[m-n-1][5+j]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
									}
								}
							}						
							
							//本行数据处理
							arr[m][0]=(n+1)+"";
							arr[m][1]=l1.get(i).getXmmc();
							arr[m][2]=l1.get(i).getV_0();
							arr[m][3]=l1.get(i).getV_1();
							arr[m][4]=l1.get(i).getV_2()+"";
							arr[m][4+l.size()+1]="0";
							arr[m][4+l.size()+2]=Double.parseDouble(l1.get(i).getV_3())+"";
							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
								arr[m][4+l.size()+1]=Double.parseDouble(l1.get(i).getV_3())+"";
								for(int j=0;j<l.size();j++){
									if( s.equals(l.get(j).getYf()) ){
										arr[m][5+j]=Double.parseDouble(l1.get(i).getV_3())+"";
									}
								}
							}
							m++;
							n++;
							xmmc=l1.get(i).getXmmc();
                       }
						
                       if( !xmmc.equals(l1.get(i).getXmmc()) && !xmdj.equals(l1.get(i).getXmdj())) {
                    	   
                      	 //总结
                      	    arr[0][4]=new  BigDecimal(arr[0][4]).add(new  BigDecimal(l1.get(i).getV_2())).toString();
  							arr[0][4+l.size()+2]=new  BigDecimal(arr[0][4+l.size()+2]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
  							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
  								arr[0][4+l.size()+1]=new  BigDecimal(arr[0][4+l.size()+1]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
  								for(int j=0;j<l.size();j++){
  									if( s.equals(l.get(j).getYf()) ){
  										arr[0][5+j]=new  BigDecimal(arr[0][5+j]).add(new  BigDecimal(l1.get(i).getV_3())).toString();
  									}
  								}
  							}
  							
  							//小计
  							if(k==2){
  								arr[m][0]="二";
  							}if(k==3){
  								arr[m][0]="三";
  							}if(k==4){
  								arr[m][0]="四";
  							}
  							n=0;
  							arr[m][1]=l1.get(i).getXmnf()+l1.get(i).getXmdj();
  							arr[m][4]=l1.get(i).getV_2();
  							arr[m][4+l.size()+2]=l1.get(i).getV_3();
  							arr[m][4+l.size()+1]="0";
  							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
  								arr[m][4+l.size()+1]=l1.get(i).getV_3();
  								for(int j=0;j<l.size();j++){
  									if( s.equals(l.get(j).getYf()) ){
  										
  										arr[m][5+j]=l1.get(i).getV_3();
  									}
  								}
  							}
  							m++;
  							k++;					
  							
  							//本行数据处理
  						
  						//本行数据处理
							arr[m][0]=(n+1)+"";
							arr[m][1]=l1.get(i).getXmmc();
							arr[m][2]=l1.get(i).getV_0();
							arr[m][3]=l1.get(i).getV_1();
							arr[m][4]=l1.get(i).getV_2()+"";
							arr[m][4+l.size()+1]="0";
							arr[m][4+l.size()+2]=l1.get(i).getV_3();
							if(elist.getYf().substring(0, 4).equals(l1.get(i).getNf())){
								arr[m][4+l.size()+1]=l1.get(i).getV_3();
								for(int j=0;j<l.size();j++){
									if( s.equals(l.get(j).getYf()) ){
										arr[m][5+j]=l1.get(i).getV_3();
									}
								}
							}
							m++;
							n++;
							xmmc=l1.get(i).getXmmc();
							xmdj=l1.get(i).getXmdj();
                         }
					}
				}
                
                
                for(int a=0;a<arr.length;a++){
                	//System.out.println("a:"+a+":arr[a][4]:"+arr[a][4]+":arr[a][4+l.size()+2]:"+arr[a][4+l.size()+2]);
                	
                	arr[a][4+l.size()+3]=new  BigDecimal(arr[a][4]).subtract(new  BigDecimal(arr[a][4+l.size()+2])).toString();
                			
                }
			return arr;
		}	
	@Override
	public List<Excel_list> getZjsydwbbhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=null;List<Excel_list> l2=null;
			if("按地市".equals(elist.getHjlx())){
				l=queryList("getZjsydwbbhzbhjds",elist);
				l1=queryList("getZjsydwbbhzbhzds",elist);
				for (int i = 0; i < l1.size(); i++) {
					l.add(l1.get(i));
				}
			}else{
				l=queryList("getZjsydwbbhzbhj",elist);
				l1=queryList("getZjsydwbbhzbhzds",elist);
				l2=queryList("getZjsydwbbhzbhz",elist);
				int k=0;
				for (int i = 0; i < l1.size(); i++) {
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						l1.get(i).setV_1(l1.get(i).getV_1()+"合计");
					}
					l.add(l1.get(i));
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						for (int j = k; j < l2.size(); j++) {
							if(l1.get(i).getGydwdm().equals(l2.get(j).getGydwdm().substring(0, 1).equals("1") ? "11101"+l2.get(j).getGydwdm().substring(5,9)+"00" : l2.get(j).getGydwdm().substring(0,9)+"00" )) {
								l.add(l2.get(j)); k++;
							}else {
								break;
							}
						}
					}
				}
				
			}
		
		return l;
	}
	
	@Override
	public List<Excel_list> getZjsydwsbhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=null;List<Excel_list> l2=null;
			if("按地市".equals(elist.getHjlx())){
				l=queryList("getZjsydwsbhzbhjds",elist);
				l1=queryList("getZjsydwsbhzbhzds",elist);
				for (int i = 0; i < l1.size(); i++) {
					l.add(l1.get(i));
				}
			}else{
				l=queryList("getZjsydwsbhzbhj",elist);
				l1=queryList("getZjsydwsbhzbhzds",elist);
				l2=queryList("getZjsydwsbhzbhz",elist);
				int k=0;
				for (int i = 0; i < l1.size(); i++) {
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						l1.get(i).setV_1(l1.get(i).getV_1()+"合计");
					}
					l.add(l1.get(i));
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						for (int j = k; j < l2.size(); j++) {
							if(l1.get(i).getGydwdm().equals(l2.get(j).getGydwdm().substring(0, 1).equals("1") ? "11101"+l2.get(j).getGydwdm().substring(5,9)+"00" : l2.get(j).getGydwdm().substring(0,9)+"00" )) {
								l.add(l2.get(j)); k++;
							}else {
								break;
							}
						}
					}
				}
				
			}
		
		return l;
	}
	
	@Override
	public List<Excel_list> getZjsyxmbbhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=new ArrayList<Excel_list>();
			l=queryList("getZjsyxmbbhzbhj",elist);
			l1=queryList("getZjsyxmbbhzbhz",elist);
		for (int i = 0; i < l1.size(); i++) {
			l.add(l1.get(i));
		}
		
		return l;
	}
	
	@Override
	public List<Excel_list> getZjsyxmsbhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=new ArrayList<Excel_list>();
			l=queryList("getZjsyxmsbhzbhj",elist);
			l1=queryList("getZjsyxmsbhzbhz",elist);
		for (int i = 0; i < l1.size(); i++) {
			l.add(l1.get(i));
		}
		
		return l;
	}
	
	@Override
	public List<Excel_list> getZjsydwbbsbhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=null;List<Excel_list> l2=null;
			if("按地市".equals(elist.getHjlx())){
				l=queryList("getZjsydwbbsbhzbhjds",elist);
				l1=queryList("getZjsydwbbsbhzbhzds",elist);
				for (int i = 0; i < l1.size(); i++) {
					l.add(l1.get(i));
					
				}
			}else{
				l=queryList("getZjsydwbbsbhzbhj",elist);
				l1=queryList("getZjsydwbbsbhzbhzds",elist);
				l2=queryList("getZjsydwbbsbhzbhz",elist);
				int k=0;
				for (int i = 0; i < l1.size(); i++) {
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						l1.get(i).setV_1(l1.get(i).getV_1()+"合计");
					}
					l.add(l1.get(i));
					if(l1.get(i).getGydwdm().substring(0, 1).equals("1")) {
						for (int j = k; j < l2.size(); j++) {
							if(l1.get(i).getGydwdm().equals(l2.get(j).getGydwdm().substring(0, 1).equals("1") ? "11101"+l2.get(j).getGydwdm().substring(5,9)+"00" : l2.get(j).getGydwdm().substring(0,9)+"00" )) {
								l.add(l2.get(j)); k++;
							}else {
								break;
							}
						}
					}
					
				}
			}
	
		return l;
	}
	
	
	@Override
	public List<Excel_list> getZjsyxmbbsbhzb(Excel_list elist) {
		List<Excel_list> l=new ArrayList<Excel_list>();
		List<Excel_list> l1=new ArrayList<Excel_list>();
			l=queryList("getZjsyxmbbsbhzbhj",elist);
			l1=queryList("getZjsyxmbbsbhzbhz",elist);
		for (int i = 0; i < l1.size(); i++) {
			l.add(l1.get(i));
		}
		
		return l;
	}

	@Override
	public List<Excel_list> getbbfwqk(Excel_list elist) {
		return queryList("getbbfwqk",elist);
	}
	@Override
	public List<Excel_list> getbbtbqk(Excel_list elist) {
		return queryList("getbbtbqk",elist);
	}

	@Override
	public List<Excel_list> getZjxdzjdwzjbf(Excel_list elist) {
		List<Excel_list> list = new ArrayList();
		// Excel_list excel_list = queryOne("getZjxdzjdwzjbfSum", elist);
		List<Excel_list> zhbfList = queryList("getZjxdzjdwzjbf", elist);
		// list.add(excel_list);
		list.addAll(zhbfList);
		return list;
	}

	@Override
	public int getZjxdzjdwzjbfCount(Excel_list elist) {
		return queryOne("getZjxdzjdwzjbfCount", elist);
	}

	@Override
	public List<Excel_list> exportZjxdzjdwzjbf(Excel_list elist) {
		List<Excel_list> list = new ArrayList();
		Excel_list excel_list = queryOne("getZjxdzjdwzjbfSum", elist);
		List<Excel_list> zhbfList = queryList("getZjxdzjdwzjbf", elist);
		list.add(excel_list);
		list.addAll(zhbfList);
		return list;
	}

	@Override
	public Excel_list getZjxdzjdwzjbfSum(Excel_list elist) {
		return queryOne("getZjxdzjdwzjbfSum", elist);
	}
}
